/**
 * @desc 集成应用配置
 * @date 2023-07-07
 */
// 表头
const tableColumnData = [
  {
    label: '应用编码',
    prop: 'code',
    tooltip: true,
    other: {
      color: '#409EFF'
    },
    align: "left"
  },
  {
    label: '应用名称',
    prop: 'name',
    tooltip: true,
  },
  {
    label: '登记产品编码',
    prop: 'registeredProductCodeName',
    tooltip: true,
  },
  {
    label: '版本号',
    prop: 'versionNumberName',
    tooltip: true,
  },
  {
    label: '版本说明',
    prop: 'versionDescriptionName',
    tooltip: true,
  },
  {
    label: '应用说明',
    prop: 'appDescription',
    tooltip: true,
  },
  {
    label: '接入方式',
    prop: 'accessMode',
    tooltip: true,
  },
  {
    label: '应用标签',
    prop: 'appLabel',
    tooltip: true,
  },
  {
    label: '应用服务商',
    prop: 'appServiceProvider',
    tooltip: true,
  },
]

// 基本信息内容
const formRow = [
  {
    elCol: [{
      label: '应用编码',
      prop: 'code',
      tag: 'elInput',
    },{
      label: '应用名称',
      prop: 'name',
      tag: 'elInput',
    }]
  },
  {
    elCol: [{
      label: '登记产品编码',
      prop: 'registeredProductCode',
      tag: 'elSelect',
      options:[],
      optionValue:'id',
			optionLabel:'code',
      span: 24
    }]
  },
  {
    elCol: [{
      label: '版本号',
      prop: 'versionNumber',
      tag: 'elSelect',
      options:[],
      optionValue:'id',
			optionLabel:'versionNumber',
      span: 24
    }]
  },
  {
    elCol: [{
      label: '版本说明',
      prop: 'versionDescription',
      tag: 'elInput',
      type: 'textarea',
      span: 24,
    }]
  },
  {
    elCol: [{
      label: '应用说明',
      prop: 'appDescription',
      tag: 'elInput',
      type: 'textarea',
      span: 24
    }]
  },
  {
    elCol: [{
      label: '应用标签',
      prop: 'appLabel',
      tag: 'elInput',
      span: 24,
    }]
  },
  {
    elCol: [{
      label: '应用服务商',
      prop: 'appServiceProvider',
      tag: 'elInput',
      span: 24,
    }]
  },
  {
    elCol: [{
      label: '接入方式',
      prop: 'accessMode',
      tag: 'elSelect',
      options:[],
      optionValue:'column_value',
			optionLabel:'column_content',
      span: 24
    }]
  },
]

const basicsRules ={
  name:[{
    required: true,
    message: '请输入应用名称',
    trigger: 'blur'
  }],
  code:[{
    required: true,
    message: '请输入应用编码',
    trigger: 'blur'
  }],
  registeredProductCode:[{
    required: true,
    message: '请选择登记产品编码',
    trigger: 'blur'
  }],
  versionNumber:[{
    required: true,
    message: '请选择版本号',
    trigger: 'blur'
  }],
  versionDescription:[{
    required: true,
    message: '请输入版本说明',
    trigger: 'blur'
  }],
  appDescription:[{
    required: true,
    message: '请输入应用说明',
    trigger: 'blur'
  }],
  appServiceProvider:[{
    required: true,
    message: '请输入应用服务商',
    trigger: 'blur'
  }],
  accessMode:[{
    required: true,
    message: '请选择接入方式',
    trigger: 'blur'
  }],
}

// 查看
const formRowShow = [
  {
    elCol: [{
      label: '应用编码',
      prop: 'code',
      tag: 'elInput',
      disabled:true,
    },{
      label: '应用名称',
      prop: 'name',
      tag: 'elInput',
      disabled:true,
    }]
  },
  {
    elCol: [{
      label: '登记产品编码',
      prop: 'registeredProductCode',
      tag: 'elSelect',
      disabled:true,
      options:[],
      optionValue:'id',
			optionLabel:'code',
      span: 24
    }]
  },
  {
    elCol: [{
      label: '版本号',
      prop: 'versionNumber',
      tag: 'elSelect',
      disabled:true,
      options:[],
      optionValue:'id',
			optionLabel:'versionNumber',
      span: 24
    }]
  },
  {
    elCol: [{
      label: '版本说明',
      prop: 'versionDescription',
      disabled:true,
      tag: 'elInput',
      type: 'textarea',
      span: 24,
    }]
  },
  {
    elCol: [{
      label: '应用说明',
      prop: 'appDescription',
      tag: 'elInput',
      type: 'textarea',
      disabled:true,
      span: 24
    }]
  },
  {
    elCol: [{
      label: '应用标签',
      prop: 'appLabel',
      tag: 'elInput',
      disabled:true,
      span: 24,
    }]
  },
  {
    elCol: [{
      label: '应用服务商',
      prop: 'appServiceProvider',
      tag: 'elInput',
      disabled:true,
      span: 24,
    }]
  },
  {
    elCol: [{
      label: '接入方式',
      prop: 'accessMode',
      tag: 'elSelect',
      disabled:true,
      options:[],
      optionValue:'column_value',
			optionLabel:'column_content',
      span: 24
    }]
  },
]
export default {
  tableColumnData,
  formRow,
  basicsRules,
  formRowShow
}